{% extends "__data_browser__/layout.html" %}
{% block __data_browser__custom_external_block %}
  <script type="text/javascript">
    $(function () {
      $("input[name=begin_date]").change(function () {
        $("input[name=end_date]").datetimepicker('setStartDate', $(this).val());
      });
      $("input[name=end_date]").change(function () {
        $("input[name=begin_date]").datetimepicker('setEndDate', $(this).val());
      });
    });
  </script>
{% endblock %}
{% block body %}
  <div class="row">
    <div class="col-lg-2">
      <div class="well well-sm">
        <ul class="nav nav-pills nav-stacked">
          {% for group in sub_nav_bar.groups %}
            <li class="text-muted"><h5>{{ group.name }}</h5></li>
            {% for nav_link in group.nav_links %}
              {% if nav_link.enabler() %}
                <li class="active text-center">
                  <a href="{{ nav_link.url }}"><strong>{{ nav_link.anchor }}</strong></a>
                </li>
              {% else %}
                <li class="text-center">
                  <a href="{{ nav_link.url }}">{{ nav_link.anchor }}</a>
                </li>
              {% endif %}
            {% endfor %}
          {% endfor %}
        </ul>
      </div>
    </div>
    <form action="{{ url_for('admin.team_performance') }}" rol="form" class="form-inline col-lg-10" method="POST">
      生产日期在
      <div class="form-group">
        <input data-format="yyyy-MM-dd" data-role="datepicker" class="form-control" type="text" name="begin_date"
            {% if begin_date %}
               value="{{ begin_date }}"
            {% endif %}>
      </div>
      与
      <div class="form-group">
        <input data-format="yyyy-MM-dd" data-role="datepicker" type="text" name="end_date" class="form-control"
            {% if end_date %}
               value="{{ end_date }}"
            {% endif %} >
      </div>
      之间的订单
      <button class="btn btn-default" type="submit" id="export">导出表格</button>
    </form>
  </div>

{% endblock %}
